package com.kehutong.help.app;

import com.kehutong.common.util.Token;
import com.kehutong.help.entity.Help;
import com.kehutong.help.service.HelpService;
import org.coraframework.inject.Inject;
import org.coraframework.json.JSONObject;
import org.coraframework.logger.Logger;
import org.coraframework.logger.LoggerFactory;
import org.coraframework.mvc.MvcAction;
import org.coraframework.mvc.http.ReqMapping;
import org.coraframework.mvc.http.result.JSONResult;
import org.coraframework.mvc.http.result.Result;

/**
 * @program: kht
 * @description: 小程序接口
 * @author: joneron
 * @create: 2021/5/27
 **/
@MvcAction
@ReqMapping("/kht-bin/applet/help")
public class HelpAction {

    private static final Logger logger = LoggerFactory.getLogger(HelpAction.class);

    @Inject
    private HelpService helpService;


    @ReqMapping("/list")
    public JSONResult helpList(Token token, JSONObject jsonObject) {

        return Result.success(helpService.list(jsonObject));
    }

    @ReqMapping("/get")
    public Object get(Token token, Help help) {

        return Result.success(help);
    }
}
